home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990422-19990725 / 000147_news@watsun.cc.columbia.edu _Sat Jun 12 14:35:14 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA21984
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Sat, 12 Jun 1999 14:35:14 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id OAA12520
  7.     for kermit.misc@watsun.cc.columbia.edu; Sat, 12 Jun 1999 14:15:29 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: peter@baileynm.com (Peter da Silva)
  10. Subject: Re: ISO VT320 emulator with key-bindings for Oracle Forms
  11. Date: 12 Jun 1999 18:12:32 GMT
  12. Organization: Bailey Network Management
  13. Message-ID: <7ju7ug$nm8@web.nmti.com>
  14. To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <7jr6lr$4f1$1@newsmaster.cc.columbia.edu>,
  17. Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
  18. >But again: in general, there is no API in UNIX to get the keycode of a
  19. >keyboard event.
  20.  
  21. Assuming that's what you want, no. However there is an API in UNIX to
  22. get a string of one or more characters that represent a keystroke, and
  23. for non-pathological cases that's all you need.
  24.  
  25. After all, we ARE talking about a terminal emulator. Yes, you can get
  26. escape sequences garbled over communication lines that don't maintain
  27. time information. But there's two cases we need to consider here:
  28.  
  29.     1. The terminal emulator is "close" to the keyboard.
  30.  
  31.     Here, time information is preserved, the emulator can reliably
  32.     distinguish keystrokes. This is the case of a PC or a UNIX program
  33.     running on a console or in an X terminal.
  34.  
  35.     2. The terminal emulator is far from the keyboard.
  36.  
  37.     Here, it isn't. But remember that the other side of the terminal
  38.     emulator is also generating escape sequences that are subject to
  39.     the same problem... so a PC-based terminal emulator would have
  40.     the same trouble getting ITS escape sequences reliably recognised,
  41.     since it would have to run close to the keyboard and far from the
  42.     application.
  43.  
  44. The only case I can think of where there's a problem is if the input
  45. escape sequence (from the keyboard to the emulator) is less reliably
  46. recognised then the output one (from the emulator to the application),
  47. or if the emulator is running on a significantly overloaded computer.
  48.  
  49. If you need to distinguish codes (like shift-alt-F7 versus alt-F7) that 
  50. the OS doesn't provide a hook for, then you have a problem, but this,
  51. like the heavily overloaded computer, is a pretty pathological case.
  52.  
  53. After all, international PC keyboards give you bigger problems than this.
  54.  
  55. I haven't figured out how to generate a seperate "~" on some spanish
  56. keyboards, for example.
  57.  
  58. -- 
  59. In hoc signo hack, Peter da Silva <peter@baileynm.com>
  60.  `-_-'   Ar rug t∩┐╜ barr∩┐╜g ar do mhact∩┐╜re inniu? 
  61.   'U`    "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd
  62.